<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<script type="text/javascript" src="js/jquery.itextclear.js"></script>
<script type="text/javascript" src="${ctx}/js/global_util.js"></script>
<script type="text/javascript">
	$(document)
			.ready(
					function() {
						$(
								'input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], textarea',
								'.form').iTextClear();
					});
</script>
<!-- jQplot CSS -->

<link rel="stylesheet" media="screen" href="${ctx}/css/Tree.css" />
<!-- jQplot CSS END -->

<!-- DATATABLES CSS -->
<link rel="stylesheet" media="screen" href="lib/datatables/css/vpad.css" />
<script type="text/javascript"
	src="lib/datatables/js/jquery.dataTables.js"></script>
<!-- DATATABLES CSS END -->

<h1 class="page-title">${listTitle}</h1>
<div class="container_12 clearfix leading">
	<%@include file="/WEB-INF/pages/common/common_orgtab.jsp"%>
	<!--control layer -->
	<s:if test="#request.module == 'qual_standset'">
		<div class="tabs side grid_12 leading">
			<div class="clear"></div>
			<div class="grid_12">
				<div class="form-action clearfix">
					<p>
						<input type="checkbox" value="1" id="all_select"
							onchange="checkAll(this,'chk_qual_standset')" /><label
							for="all_select">全选</label> <a class="button"
							href="javascript:void(0)"
							onclick="deleteDatas('${ctx}/exam/qual_standset_delete.xhtml','chk_qual_standset')">批量删除</a>
						<a class="button" href="javascript:void(0)" onclick="javascript:location.href='#exam/qual_standset_add.xhtml?organizationId=' + currentSelOrgId;"><span
							style="background: url(${ctx}/images/img/add.png)" class="icon">&nbsp;</span>添加</a>
					</p>
				</div>

			</div>
		</div>
	</s:if>
	<s:elseif test="#request.module == 'invite_arrange'">
		<div class="tabs side grid_12 leading">
			<div class="clear"></div>
			<div class="grid_12">
				<div class="form-action clearfix">
					<p>
						<input type="checkbox" value="1" id="form-updates-ia"
							onchange="checkAll(this,'chk_invite_arrange')" /><label
							for="form-updates-ia">全选</label> <a class="button"
							href="javascript:void(0)" onclick="handleInviteArrange('modify')"><span
							style="background: url(${ctx}/images/img/add.png)" class="icon">&nbsp;</span>修改招聘渠道</a>
						<a class="button" href="javascript:void(0)"
							onclick="handleInviteArrange('add')"><span
							style="background: url(${ctx}/images/img/add.png)" class="icon">&nbsp;</span>添加招聘渠道</a>
					</p>
				</div>

			</div>
		</div>
	</s:elseif>
	<!--control layer end-->
</div>

<div class="clear"></div>
<script type="text/javascript">
	
	/**
	* 删除数据
	*/
	function deleteDatas(url,name) {
		var checkIds = new Array();
		$("input[type='checkbox'][name='chk_qual_standset']").each(function() {
			if (this.checked) {
				checkIds.push(this.value);
			}
		});
		if (checkIds.length == 0) {
			return;
		}
		if (confirm("确定要删除选中的数据吗？")) {
			doDeleteDatas(url,checkIds.join(","));
		}
	}

    /**
     * 删除指定数据集
     * @param url
     * @param ids
     */
	function doDeleteDatas(url,ids) {
		$.ajax({
			type : "get",
			url : url,
			data: {"ids":ids},
			dataType : "json",
			success : function(data) {
				// load the grade list
				//currentTabOrgId
				if(typeof(currentTabOrgId) == 'number'){
					loadListContent("${ctx}${listAction}", currentTabOrgId);
				}else{
					loadListContent("${ctx}${listAction}",${organizationId});
				}
			}
		});
	}

	

	
</script>